package day2.pet;

/**
 * @author oldliu
 * @since 1.0
 */
public class Penguin extends Pet {
    public Penguin(String name, String sex, int health, int love) {
        super(name, sex, health, love);
        System.out.println("构造完成，输出看看：");
        super.print();
    }
    public Penguin(){
        System.out.println("企鹅的无参调用方法！");
    }
    public Penguin(String name){
        super.name=name;//直接给name赋值
        //this(name,null,0,0);
    }

    public void swim(){
        System.out.println(super.getName()+"正在水中游来游去");
    }

    @Override
    public void eat() {
       // super.eat();
        System.out.println(super.getName()+"在吃鱼。。。");
    }
}
